from flask import Flask,session
from info import create_app,db,models
from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager

# 根据传递不同配置的key，获取不同的配置类信息
app = create_app("develop")

# 创建manager对象，管理app
manager =  Manager(app)

# 使用migrate关联app,db
Migrate(app,db)

# 给manager添加操作命令
manager.add_command("db",MigrateCommand)

if __name__ == '__main__':
    manager.run()